﻿using DirectSell.Model.Money;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Webdiyer.WebControls.Mvc;

namespace Direct.IDAL.User.Money
{
    /// <summary>
    /// 转账仓储接口
    /// </summary>
    public interface IUserGiroRepository:IAbsRepository
    {
        /// <summary>
        /// 查电子币余额
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        decimal QueryVirtualMoneyBanlace(string usercode);
        /// <summary>
        /// 转出人扣电子币
        /// </summary>
        /// <param name="UserCode"></param>
        /// <param name="money"></param>
        /// <param name="hstable"></param>

        void Hushmoney(string UserCode, decimal money, ref Hashtable hstable);
        /// <summary>
        /// 接收人增加电子币
        /// </summary>
        /// <param name="UserCode"></param>
        /// <param name="money"></param>
        /// <param name="hstable"></param>
        void AddMoney(string UserCode, decimal money, ref Hashtable hstable);
        /// <summary>
        /// 写入转账表
        /// </summary>
        /// <param name="req"></param>
        /// <param name="hstable"></param>
        void InsertGiro(UserGiroReq req,  ref Hashtable hstable);
        /// <summary>
        /// 判断接受会员是否存在
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        bool CheckIsExcits(string usercode);
        /// <summary>
        /// 查询转出记录
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        Task<PagedList<UserGiro>> GetHushRecord(string usercode, int pageindex, int pagesize);
        /// <summary>
        /// 查转入记录
        /// </summary>
        /// <param name="usercode"></param>
        /// <returns></returns>
        Task<PagedList<UserGiro>> GetReciveRecord(string usercode, int pageindex, int pagesize);
    }
}
